#pragma once

class ISocketWatcher
{
public:
	ISocketWatcher(void){};
	~ISocketWatcher(void){};
public:
	virtual BOOL Initalize(){return TRUE;};
	virtual BOOL UnInitalize(){return TRUE;};
public:
	virtual void OnAccept(int nErrorCode){};

	//Notifies a socket that the socket connected to it has closed.
	virtual void OnClose(int nErrorCode){};

	//Notifies a connecting socket that the connection attempt is complete, whether successfully or in error.
	virtual void OnConnect(int nErrorCode){};

	//Notifies a listening socket that there is data to be retrieved by calling Receive.
	virtual void OnReceive(int nErrorCode){};

	//Notifies a socket that it can send data by calling Send.
	virtual void OnSend(int nErrorCode){};

	virtual BOOL OnHostNameResolved(const SOCKADDR_IN *pSockAddr){return TRUE;};

	virtual void OnFailConnect(int nErrorCode){};
};
